package com.home.task;

import org.slf4j.Logger;

public interface ITask {
    //循环任务
    public boolean circlePlan() ;



    public String getName();

    default void doPlan(Logger logger){
        logger.debug("{}开始.",getName());
        long start = System.currentTimeMillis();

        //循环任务
        while (circlePlan()) {
        }
        long end = System.currentTimeMillis();
        logger.debug( "{}结束.共耗时：{} 毫秒",getName(),(end - start) );
    }
}
